package convertedio;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.Charset;

public class Demo1 {
    public static void main(String[] args) throws IOException {
        //jdk11 指定编码表
        FileReader fr = new FileReader("C:\\Users\\1\\Desktop\\src\\a.txt", Charset.forName("GBK"));
        int len;
        while ((len=fr.read())!=-1){
            System.out.println((char) len);
        }
        fr.close();
    }
}
